<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{dede:field.typename/}-{dede:global.cfg_webname/}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<link rel="canonical" href="{dede:global.cfg_basehost/}{dede:type typeid='0' row=1}[field:typelink/]{/dede:type}"/>
<link href="{dede:global.mcfg_basehost/}/m-css/m-index.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="{dede:global.mcfg_basehost/}/m-js/jquery.js"></script>
<script type="text/javascript" src="{dede:global.cfg_basehost/}/system/gzs.ajax.js"></script>
<script type="text/javascript">
function CheckLogintop(){
var taget_obj = document.getElementById('_userlogin');
myajax = new DedeAjax(taget_obj,false,false,'','','');
myajax.SendGet2("/user/ajax_loginsta.php");
DedeXHTTP = null;
}
</script>
<style type="text/css">
.jjweixinBtn{position:fixed;right:15px;bottom:150px;width:40px;height:40px;background:#fff url({dede:global.mcfg_basehost/}/m-images/list-fanhui.png) center no-repeat;background-size:25px 25px;border-radius:50%;box-shadow:0px 5px 11px 0px rgba(0,0,0,0.07);opacity:0.7;display:none;}

/*加载中*/
.yxw-list-loading{width:100%;height:50px;line-height:50px;color:#757575;background:#f0f0f0;text-align:center;font-size:14px;}
</style>
</head>
<body>

<div class="wrapper">
{dede:include filename="head_m.htm"/}
<h1 class="gzs-top-h1" style="font-size:20px;font-weight:700;color:#333;background:#fff;padding:15px 15px 0 15px;">{dede:field.typename/}</h1>
<!-- 课程列表 -->
<div class="m-header-video">
<ul class="content_list">
{dede:listsql sql="SELECT * FROM #@__arctype WHERE `reid` = '18' AND `isrecommend` = '0' ORDER BY id DESC" pagesize="10"}
<li class="content_item">
<a href="[field:global.mcfg_basehost/][field:id function='GetTypeDeurl(@me)'/]" class="link">
<img src="[field:bigpic function='mstrone(@me)'/]">
<div class="main_title_box">
<div class="main_title">[field:typename/]</div>
<div class="sub_title">
[field:array runphp='yes']
global $cfg_dazhe,$cfg_zhekou,$cfg_dqtime;
$oprice = @me['price'];
$time = time();
$timestamp = strtotime($cfg_dqtime);
if(!empty($oprice))
{
if($cfg_dazhe == 'Y' && $timestamp > $time)
{
$dzprice = $oprice / 100 * $cfg_zhekou;
@me = "<span class=\"price\"><i>￥</i>{$dzprice} <small>￥{$oprice}</small></span>";}
else{
@me = "<span class=\"price\"><i>￥</i>{$oprice}</span>";}
}else{
@me = "<span class=\"ke-mianfei\">免费</span>";}
[/field:array]
<span class="item_right fr">[field:id function="JJgetCliak(@me)"/]次学习</span>
</div>
</div>
</a>
</li>
{/dede:listsql}
</ul>
</div>
<!-- 课程列表 End -->

<div id="dianhuafei" class="yxw-list-loading"></div>
<div class="xiayiyequ" style="display:none;">{dede:pagelist listitem="next"/}</div>

</div>


<!-- 最底部导航 -->
<div class="gzs-bottombar">
<a href="{dede:global.mcfg_basehost/}/" class="gzs-bo"><img src="{dede:global.mcfg_basehost/}/m-images/index.png"><p>首页</p></a>
<a href="{dede:global.mcfg_basehost/}/user/buyhui.php" class="gzs-bo"><img src="{dede:global.mcfg_basehost/}/m-images/index-ke.png"><p>会员</p></a>
<a href="{dede:global.mcfg_basehost/}/user/operation_ke.php" class="gzs-bo"><img src="{dede:global.mcfg_basehost/}/m-images/index-yg.png"><p>学习</p></a>
<a href="{dede:global.mcfg_basehost/}/user/" class="gzs-bo"><img src="{dede:global.mcfg_basehost/}/m-images/index-admin.png"><p>我的</p></a>
</div>
<!-- 最底部导航 End -->

{dede:include filename="kc_search_m.htm"/}
{dede:include filename="wz-tongji.htm"/}

<script>
var f = true; 
function getxia(){
    var link = $(".xiayiyequ a");
        var href = link.attr("href");
        if (href != undefined) { 
        $(".yxw-list-loading").html('加载中...');
            $.ajax({
                type: "get",
                url: href,
                success: function(data) {  
                 console.log(data);				
                    $(".content_list").append($(data).find(".content_list").html());
                    f = true;
                    var newHref = $(data).find(".nextPage").attr("href");  
                    console.log(newHref);                                               
                    if (newHref != undefined) {
                    link.attr("href", newHref);
                    } else {
                    $("#dianhuafei").html("~已经到底了~");
                    link.html("下一页没有了").removeAttr("href");
                    };
			    }
            });
        }else{
        $("#dianhuafei").html("~没有更多了~");
        }
        return false;   
}
$(document).scroll(function(){
            //滚动条滑动的时候获取滚动条距离顶部的距离
            var scroll=$(document).scrollTop();
            //屏幕的高度
            var client=$(window).height();
            var h=$(document).height();
            var flag=true;
            var bih = scroll+client+100 ;       
            if (h<= bih) { // 到达底部时,加载新内容    
            if(f){
            f  = false;
           getxia();   
}                 
}
});
</script>

</body>
</html>